import { createRouter, createWebHashHistory } from "vue-router";
// import Home from '@.components/Hellorld.vue'
import {navData} from '@/untils/nav'

const routes = [
    { 
        path: '/',
        name: 'Home',
        components: ()=>import("@/components/HelloWord.vue")
    }
]

navData.forEach((item)=>{
    routes.push({
        path: item.path,
        name: item.name,
        components: ()=>import("@/"+item.component)
    })
})
const router=createRouter({
    history:createWebHashHistory(),
    routes
})

export default router